Skip to content

Commit

Permalink
Merge pull request #1368 from oleskiewicz/master
Browse files Browse the repository at this point in the history
mu-config: add NO_COLOR environment variable
  • Loading branch information
djcb authored Feb 2, 2019
2 parents b4e0c09 + 4784a7b commit eb6efee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions man/mu-easy.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ commands, but you won't be able to index/search your mail.

By default, \fBmu\fR uses colorized output when it thinks your
terminal is capable of doing so. If you don't like color, you can use
the \fB--nocolor\fR command-line option, or set the \fBMU_NOCOLOR\fR
environment variable to non-empty.
the \fB--nocolor\fR command-line option, or set either the
\fBMU_NOCOLOR\fR or the \fBNO_COLOR\fR environment variable to
non-empty.

.SH INDEXING YOUR E-MAIL

Expand Down
4 changes: 2 additions & 2 deletions mu/mu-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ set_group_mu_defaults (void)
MU_CONFIG.muhome = exp;
}

/* check for the MU_NOCOLOR env var; but in any case don't
/* check for the MU_NOCOLOR or NO_COLOR env vars; but in any case don't
* use colors unless we're writing to a tty */
if (g_getenv (MU_NOCOLOR) != NULL)
if (g_getenv (MU_NOCOLOR) != NULL || g_getenv ("NO_COLOR") != NULL)
MU_CONFIG.nocolor = TRUE;

if (!isatty(fileno(stdout)) || !isatty(fileno(stderr)))
Expand Down

0 comments on commit eb6efee

Please sign in to comment.